package com.yicong.ants.bean.account;

import com.google.gson.annotations.SerializedName;

/**
 * @author cchao
 * @version 2019-05-24.
 */
public class UserBeanBackup {

    String id;
    /**
     * 用户账号
     */
    @SerializedName("user_name")
    String mobile;

    /**
     * 用户昵称
     */
    String nickname;
    /**
     * 用户头像
     */
    String avatar;
    /**
     * 绑定旅游卡号(未绑定时为空)
     */
    @SerializedName("passport_num")
    String card_num;

    /**
     * 用户真实姓名
     */
    @SerializedName("real_name")
    String id_card_name;
    /**
     * 用户性别
     */
    String gender;
    @SerializedName("id_number")
    String id_card_num;

    @SerializedName("expire_time")
    String card_expire_date;
    /**
     * 卡类型名称   月卡会员
     */
    String type_name;
    // 黄金版，月卡，体验卡
    String card_type_label;
    /**
     * 年卡类型数值（0：未绑定，1：黄金版，2：豪华版 3: 月卡）
     */
    @SerializedName("passport_status")
    int card_type;
    /**
     * 门票数量
     */
    int score;
    int sign_count;
    int is_sign;
    int recommend_num;

    /**
     * 过期提示语
     */
    String notice;
    /**
     * 0:未过期，1:已过期
     */
    int is_expired;
    String jwt_token;
    // 自定义
    String gender_text;
    String card_type_text;

    public UserBeanBackup() {
    }

    public boolean isBindCard() {
        return card_type > 0;
    }

    public String getMobile() {
        return mobile;
    }

    public String getGenderText() {
        return gender.equals("1") ? "男" : "女";
    }

    public String getCardTypeText() {
        return card_type_label;
    }

    public UserBeanBackup setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public String getNickname() {
        return nickname;
    }

    public String getId() {
        return this.id;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public String getCard_num() {
        return this.card_num;
    }

    public String getId_card_name() {
        return this.id_card_name;
    }

    public String getGender() {
        return this.gender;
    }

    public String getId_card_num() {
        return this.id_card_num;
    }

    public String getCard_expire_date() {
        return this.card_expire_date;
    }

    public String getType_name() {
        return this.type_name;
    }

    public String getCard_type_label() {
        return this.card_type_label;
    }

    public int getCard_type() {
        return this.card_type;
    }

    public int getScore() {
        return this.score;
    }

    public int getSign_count() {
        return this.sign_count;
    }

    public int getIs_sign() {
        return this.is_sign;
    }

    public int getRecommend_num() {
        return this.recommend_num;
    }

    public String getNotice() {
        return this.notice;
    }

    public int getIs_expired() {
        return this.is_expired;
    }

    public String getJwt_token() {
        return this.jwt_token;
    }

    public String getGender_text() {
        return this.gender_text;
    }

    public String getCard_type_text() {
        return this.card_type_text;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setCard_num(String card_num) {
        this.card_num = card_num;
    }

    public void setId_card_name(String id_card_name) {
        this.id_card_name = id_card_name;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setId_card_num(String id_card_num) {
        this.id_card_num = id_card_num;
    }

    public void setCard_expire_date(String card_expire_date) {
        this.card_expire_date = card_expire_date;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }

    public void setCard_type_label(String card_type_label) {
        this.card_type_label = card_type_label;
    }

    public void setCard_type(int card_type) {
        this.card_type = card_type;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public void setSign_count(int sign_count) {
        this.sign_count = sign_count;
    }

    public void setIs_sign(int is_sign) {
        this.is_sign = is_sign;
    }

    public void setRecommend_num(int recommend_num) {
        this.recommend_num = recommend_num;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public void setIs_expired(int is_expired) {
        this.is_expired = is_expired;
    }

    public void setJwt_token(String jwt_token) {
        this.jwt_token = jwt_token;
    }

    public void setGender_text(String gender_text) {
        this.gender_text = gender_text;
    }

    public void setCard_type_text(String card_type_text) {
        this.card_type_text = card_type_text;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UserBeanBackup)) return false;
        final UserBeanBackup other = (UserBeanBackup) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$mobile = this.getMobile();
        final Object other$mobile = other.getMobile();
        if (this$mobile == null ? other$mobile != null : !this$mobile.equals(other$mobile))
            return false;
        final Object this$nickname = this.getNickname();
        final Object other$nickname = other.getNickname();
        if (this$nickname == null ? other$nickname != null : !this$nickname.equals(other$nickname))
            return false;
        final Object this$avatar = this.getAvatar();
        final Object other$avatar = other.getAvatar();
        if (this$avatar == null ? other$avatar != null : !this$avatar.equals(other$avatar))
            return false;
        final Object this$card_num = this.getCard_num();
        final Object other$card_num = other.getCard_num();
        if (this$card_num == null ? other$card_num != null : !this$card_num.equals(other$card_num))
            return false;
        final Object this$id_card_name = this.getId_card_name();
        final Object other$id_card_name = other.getId_card_name();
        if (this$id_card_name == null ? other$id_card_name != null : !this$id_card_name.equals(other$id_card_name))
            return false;
        final Object this$gender = this.getGender();
        final Object other$gender = other.getGender();
        if (this$gender == null ? other$gender != null : !this$gender.equals(other$gender))
            return false;
        final Object this$id_card_num = this.getId_card_num();
        final Object other$id_card_num = other.getId_card_num();
        if (this$id_card_num == null ? other$id_card_num != null : !this$id_card_num.equals(other$id_card_num))
            return false;
        final Object this$card_expire_date = this.getCard_expire_date();
        final Object other$card_expire_date = other.getCard_expire_date();
        if (this$card_expire_date == null ? other$card_expire_date != null : !this$card_expire_date.equals(other$card_expire_date))
            return false;
        final Object this$type_name = this.getType_name();
        final Object other$type_name = other.getType_name();
        if (this$type_name == null ? other$type_name != null : !this$type_name.equals(other$type_name))
            return false;
        final Object this$card_type_label = this.getCard_type_label();
        final Object other$card_type_label = other.getCard_type_label();
        if (this$card_type_label == null ? other$card_type_label != null : !this$card_type_label.equals(other$card_type_label))
            return false;
        if (this.getCard_type() != other.getCard_type()) return false;
        if (this.getScore() != other.getScore()) return false;
        if (this.getSign_count() != other.getSign_count()) return false;
        if (this.getIs_sign() != other.getIs_sign()) return false;
        if (this.getRecommend_num() != other.getRecommend_num()) return false;
        final Object this$notice = this.getNotice();
        final Object other$notice = other.getNotice();
        if (this$notice == null ? other$notice != null : !this$notice.equals(other$notice))
            return false;
        if (this.getIs_expired() != other.getIs_expired()) return false;
        final Object this$jwt_token = this.getJwt_token();
        final Object other$jwt_token = other.getJwt_token();
        if (this$jwt_token == null ? other$jwt_token != null : !this$jwt_token.equals(other$jwt_token))
            return false;
        final Object this$gender_text = this.getGender_text();
        final Object other$gender_text = other.getGender_text();
        if (this$gender_text == null ? other$gender_text != null : !this$gender_text.equals(other$gender_text))
            return false;
        final Object this$card_type_text = this.getCard_type_text();
        final Object other$card_type_text = other.getCard_type_text();
        if (this$card_type_text == null ? other$card_type_text != null : !this$card_type_text.equals(other$card_type_text))
            return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserBeanBackup;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $mobile = this.getMobile();
        result = result * PRIME + ($mobile == null ? 43 : $mobile.hashCode());
        final Object $nickname = this.getNickname();
        result = result * PRIME + ($nickname == null ? 43 : $nickname.hashCode());
        final Object $avatar = this.getAvatar();
        result = result * PRIME + ($avatar == null ? 43 : $avatar.hashCode());
        final Object $card_num = this.getCard_num();
        result = result * PRIME + ($card_num == null ? 43 : $card_num.hashCode());
        final Object $id_card_name = this.getId_card_name();
        result = result * PRIME + ($id_card_name == null ? 43 : $id_card_name.hashCode());
        final Object $gender = this.getGender();
        result = result * PRIME + ($gender == null ? 43 : $gender.hashCode());
        final Object $id_card_num = this.getId_card_num();
        result = result * PRIME + ($id_card_num == null ? 43 : $id_card_num.hashCode());
        final Object $card_expire_date = this.getCard_expire_date();
        result = result * PRIME + ($card_expire_date == null ? 43 : $card_expire_date.hashCode());
        final Object $type_name = this.getType_name();
        result = result * PRIME + ($type_name == null ? 43 : $type_name.hashCode());
        final Object $card_type_label = this.getCard_type_label();
        result = result * PRIME + ($card_type_label == null ? 43 : $card_type_label.hashCode());
        result = result * PRIME + this.getCard_type();
        result = result * PRIME + this.getScore();
        result = result * PRIME + this.getSign_count();
        result = result * PRIME + this.getIs_sign();
        result = result * PRIME + this.getRecommend_num();
        final Object $notice = this.getNotice();
        result = result * PRIME + ($notice == null ? 43 : $notice.hashCode());
        result = result * PRIME + this.getIs_expired();
        final Object $jwt_token = this.getJwt_token();
        result = result * PRIME + ($jwt_token == null ? 43 : $jwt_token.hashCode());
        final Object $gender_text = this.getGender_text();
        result = result * PRIME + ($gender_text == null ? 43 : $gender_text.hashCode());
        final Object $card_type_text = this.getCard_type_text();
        result = result * PRIME + ($card_type_text == null ? 43 : $card_type_text.hashCode());
        return result;
    }

    public String toString() {
        return "UserBeanBackup(id=" + this.getId() + ", mobile=" + this.getMobile() + ", nickname=" + this.getNickname() + ", avatar=" + this.getAvatar() + ", card_num=" + this.getCard_num() + ", id_card_name=" + this.getId_card_name() + ", gender=" + this.getGender() + ", id_card_num=" + this.getId_card_num() + ", card_expire_date=" + this.getCard_expire_date() + ", type_name=" + this.getType_name() + ", card_type_label=" + this.getCard_type_label() + ", card_type=" + this.getCard_type() + ", score=" + this.getScore() + ", sign_count=" + this.getSign_count() + ", is_sign=" + this.getIs_sign() + ", recommend_num=" + this.getRecommend_num() + ", notice=" + this.getNotice() + ", is_expired=" + this.getIs_expired() + ", jwt_token=" + this.getJwt_token() + ", gender_text=" + this.getGender_text() + ", card_type_text=" + this.getCard_type_text() + ")";
    }
}
